﻿@model FYSJcrm.Core.Web.Areas.SystemManage.Models.NavManageModels.NavManageViewModel
@{
    ViewBag.Title = "栏目管理";
    Layout = "~/Views/Shared/_Layout.cshtml";
}
<div class="wap-container">
    <nav class="breadcrumb" style="background-color:#fff;padding: 0 24px">
        首页
        <span class="c-gray en">/</span>
        系统管理
        <span class="c-gray en">/</span>
        栏目管理
        <a class="btn btn-success radius f-r" style="line-height:1.6em;margin-top:3px" href="javascript:location.replace(location.href);" title="刷新"><i class="Hui-iconfont">&#xe68f;</i></a>
    </nav>
    <article class="Hui-admin-content clearfix">
        <div class="panel">
            <div class="panel-body">
                <div class="clearfix">
                    <span class="f-l">
                        <a href="javascript:;" onclick="batchDelete('/SystemManage/NavManage/BatchDelete','#formList')" class="btn btn-danger radius"><i class="Hui-iconfont">&#xe6e2;</i> 批量删除</a>
                        <a class="btn btn-primary radius" onclick="add_data('添加栏目', '/SystemManage/NavManage/Add', false, 800, 550)" href="javascript:;"><i class="Hui-iconfont">&#xe600;</i> 添加栏目</a>
                    </span>
                </div>

                <div class="mt-20 clearfix">
                    <form id="formList">
                        <table class="table table-border table-bordered table-hover table-bg table-sort">
                            <thead>
                                <tr class="text-c">
                                    <th width="25"><input type="checkbox" name="" value="" class="check-all"></th>
                                    <th>栏目名称</th>
                                    <th width="80">排序</th>
                                    <th width="100">操作</th>
                                </tr>
                            </thead>
                            <tbody>
                                @foreach (var pnav in Model.Navigations)
                                {
                                    <tr class="text-c">
                                        <td><input type="checkbox" name="selectedIds" value="@pnav.Id"></td>
                                        <td class="text-l">@pnav.Title</td>
                                        <td>@pnav.SortId</td>
                                        <td class="f-14">
                                            <a title="编辑" href="javascript:;" onclick="edit_data('栏目编辑', '/SystemManage/NavManage/Edit', '@pnav.Id', false, 800, 550)" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a>
                                            <a title="删除" href="javascript:;" onclick="dataDelete(this,'/NavManage/Delete','@pnav.Id')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a>
                                        </td>
                                    </tr>
                                    foreach (var cnav in pnav.Childs.Where(n => n.ParentId == pnav.Id))
                                    {
                                        <tr class="text-c">
                                            <td><input type="checkbox" name="selectedIds" value="@cnav.Id"></td>
                                            <td class="text-l">&nbsp;&nbsp;├&nbsp;@cnav.Title</td>
                                            <td>@cnav.SortId</td>
                                            <td class="f-14">
                                                <a title="编辑" href="javascript:;" onclick="edit_data('栏目编辑', '/SystemManage/NavManage/Edit', '@cnav.Id', false, 800, 550)" style="text-decoration:none"><i class="Hui-iconfont">&#xe6df;</i></a>
                                                <a title="删除" href="javascript:;" onclick="dataDelete(this,'/SystemManage/NavManage/Delete','@cnav.Id')" class="ml-5" style="text-decoration:none"><i class="Hui-iconfont">&#xe6e2;</i></a>
                                            </td>
                                        </tr>
                                    }
                                }
                            </tbody>
                        </table>
                    </form>
                </div>
            </div>
        </div>
    </article>
</div>

@section FooterScript
{
    <script type="text/javascript" src="~/lib/datatables/1.10.15/jquery.dataTables.min.js"></script>
}

